home *** CD-ROM | disk | FTP | other *** search
- /*
-
- File: CAS_StringTools.h
-
- Contains: Header for string utility routines.
-
- Written by: David H Nelson
-
- Copyright © 1988-1995 ComponentWorks, All rights reserved.
-
- Change History (most recent first):
-
- <1> 1988 DHN Created.
-
- */
-
- #if !defined(_H_stringTools)
- #define _H_stringTools
-
-
- //----------------------------------------------------------------------
- // MaxTextLength is not 32767 since apparently TextEdit uses a terminator byte.
- #define kMaxTextLength ((unsigned long)32700)
-
-
- #if defined(__cplusplus)
- extern "C"
- {
- #endif
-
- //----------------------------------------------------------------------
- StringPtr ctopstr(char *s);
- char *ptocstr(Str255 s);
-
- //----------------------------------------------------------------------
- /* stringTools.c */
- StringPtr sGetResString(short iResID,short iStringID);
- short iStrPos(Str255 s, char c);
- char cUpperCase(char c);
- StringPtr sParamStr(Str255 theStr, Str255 s0, Str255 s1, Str255 s2, Str255 s3, Str255 s4, Str255 s5, Str255 s6, Str255 s7, Str255 s8, Str255 s9);
- void NumToEstimatedTimeString(long TimeLeft,Str63 sTimeLeft);
- void NumToTimeLeftString(long TimeLeft, Str63 sTimeLeft);
- void NumToThousandString(long theLong, Str63 sThousandString);
- void ThousandStringToNum(Str63 sThousandString, long *theLong);
- void NumToKString(long theLong, Str63 sKString);
- void NumToSizeString(long theLong, Str63 sSizeString);
- StringPtr sCopyStr(Str255 sSrc,Str255 sDst);
- StringPtr sClearStr(Str255 sSrc,short iLength);
- StringPtr sAppendStr(Str255 sSrc,Str255 sDst);
- StringPtr sNullStr(void);
- StringPtr sTrimText(StringPtr sSrc,StringPtr sDst,short iMaxWidth);
- StringPtr sFilterStr(StringPtr sSrc,StringPtr sDst);
- StringPtr sAppendHexChar(char c0,StringPtr sDst);
- StringPtr sAppendHexShort(short i0,StringPtr sDst);
- StringPtr sAppendHexLong(long l0,StringPtr sDst);
- StringPtr sAppendHexToStr(StringPtr sDst,Ptr pBuffer,long lLength);
- StringPtr sHexToStr(StringPtr sDst,Ptr pBuffer,long lLength);
- Ptr pPluralStrC(Boolean bS);
- StringPtr sPluralStr(Boolean bPlural);
- Boolean bStrCmp(StringPtr src,StringPtr dst);
- Boolean bCStrCmp(char *src,char *dst);
- void drawInfoLine(StringPtr sField, StringPtr sValue, short iJust);
- void drawRJInfoLine(StringPtr sField,StringPtr sValue);
-
- #if defined(__cplusplus)
- }
- #endif
-
-
- #endif
-
-